#include "abstract_factory.h"
#include <iostream>

void ClientCode(const GUIFactory *factory)
{
    const auto *button = factory->createButton();
    const auto *checkbox = factory->createCheckbox();
    button->clicked();
    checkbox->clicked();
    delete button;
    delete checkbox;
}

int main()
{
    GUIFactory *winFactory = new WinFactory();
    ClientCode(winFactory);

    GUIFactory *macFactory = new MacFactory();
    ClientCode(macFactory);

    return 0;
}